package com.wangshouyu.mp.qrcode;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @date 2021年01月23日 13:27
 * @description 场景信息
 */
public class Scene implements Serializable {

    /**
     * 场景id
     */
    @SerializedName(value = "scene_id")
    @JsonProperty(value = "scene_id")
    @JSONField(name = "scene_id")
    private Integer sceneId;

    /**
     * 场景参数
     */
    @SerializedName(value = "scene_str")
    @JsonProperty(value = "scene_str")
    @JSONField(name = "scene_str")
    private String sceneStr;

    public Integer getSceneId() {
        return sceneId;
    }

    public void setSceneId(Integer sceneId) {
        this.sceneId = sceneId;
    }

    public String getSceneStr() {
        return sceneStr;
    }

    public void setSceneStr(String sceneStr) {
        this.sceneStr = sceneStr;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Scene scene = (Scene) o;
        return Objects.equals(sceneId, scene.sceneId) && Objects.equals(sceneStr, scene.sceneStr);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sceneId, sceneStr);
    }

    @Override
    public String toString() {
        return "Scene{" +
                "sceneId=" + sceneId +
                ", sceneStr='" + sceneStr + '\'' +
                '}';
    }

    public Scene(Integer sceneId, String sceneStr) {
        this.sceneId = sceneId;
        this.sceneStr = sceneStr;
    }

    public Scene(Integer sceneId) {
        this.sceneId = sceneId;
    }

    public Scene() {
    }
}
